#!/usr/bin/ruby
# -*- ruby -*-
#
# http://www.reddit.com/r/dailyprogrammer/comments/12qi5b/1162012_challenge_111_easy_star_delete/

STDIN.readlines.each do |line|
    # - first remove anything before a '*', except for a '*'
    # - then remove anything after a '*', except for a '*'
    # - finally, remove all '*'s
    puts line.gsub(/[^*]\*/, '*').gsub(/\*[^*]/, '*').gsub('*', '')
end
